package com.zyy.transaction.demo.dao;

import com.zyy.transaction.demo.pojo.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author zhangyiying
 * @ClassName: AccountDao
 * @Description:
 * @date 2022/2/24 17:33
 */
@Mapper
public interface AccountMapper {
    @Update("UPDATE account SET money=#{money} WHERE cardNo=#{cardNo}")
    int updateAccountByCardNo(Account account);

    @Select("SELECT * FROM account WHERE cardNo = #{cardNo}")
    Account findByCardNo(@Param("cardNo") String cardNo);
}
